<%@ page import="org.gtesoreria.ConsultaAfiliadosController" %>
<%@ page import="org.gtesoreria.Proveedor" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'proveedor.label', default: 'Proveedor')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav" style="display:none">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
            <g:def var="proveedorId" value="${fieldValue(bean: proveedorInstance, field: 'id')}"/>
            <span class="menuButton"><g:link class="consumos" controller="consumo" action="list" params="[proveedorId:proveedorId]">Consumos</g:link></span>
        </div>
        <div class="body">
            <h1>Proveedor ${fieldValue(bean: proveedorInstance, field: "nombre")}</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog" style="float:left;margin-bottom:5px">
                <table>
                    <tbody>
                    	
                       
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="proveedor.nombre.label" default="Nombre" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: proveedorInstance, field: "nombre")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="proveedor.rubro.label" default="Rubro" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: proveedorInstance, field: "rubro")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="proveedor.comision.label" default="Comision" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: proveedorInstance, field: "comision")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="proveedor.contacto.label" default="Contacto" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: proveedorInstance, field: "contacto")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="proveedor.direccion.label" default="Direccion" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: proveedorInstance, field: "direccion")}</td>
                            
                        </tr>
                    	<tr class="prop">
                            <td valign="top" class="name"><g:message code="proveedor.email.label" default="Email" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: proveedorInstance, field: "email")}</td>
                            
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="proveedor.telefonos.label" default="Telefonos" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: proveedorInstance, field: "telefonos")}</td>
                            
                        </tr>
                    
                    </tbody>
                </table>
               
            </div>
             <div style="float:left; margin-left:5px;border:1px solid #999;display:none">
	                <g:form action="importarConsumos" method="post" enctype="multipart/form-data">
	                <g:hiddenField name="idProveedor" value="${proveedorInstance?.id}" />
	                <div style="padding:5px;">
	                 Importar Consumos 
	                 </div>
	                 <div style="padding:5px">
	                 <input type="file" name="myFile" id="file"/>
	                	<g:submitButton name="upload" value="Importar" id="upload"></g:submitButton>
	                </div>
	                </g:form>
           		</div>
            <div class="buttons" style="clear:both;">
                <g:form>
                    <g:hiddenField name="id" value="${proveedorInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </g:form>
            </div>
            
            
        </div>
    </body>
</html>
